package com.atguigu.gmall.list.client;


import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.list.SearchParam;
import com.atguigu.gmall.model.list.SearchResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "service-list")
public interface ListFeignClient {

    //更新ES的热度
    @GetMapping("/api/list/inner/incrHotScore/{skuId}")
    public Result incrHotScore(@PathVariable(name = "skuId") Long skuId);

    //第三步：搜索索引库  入参  返回值
    //  get 请求 带入参  url?带参数      ?json串 可以 不能太长 限制 火狐 7900+ 字符
    // post   带入参 请求体中
    @PostMapping("/api/list")
    public SearchResponseVo list(@RequestBody SearchParam searchParam);
}
